<?php
	$this->breadcrumbs=array(
			'Posts'=>array('index'),
			$model->title,);

	$this->pageTitle = $model->title;
	
	$this->menu=array(
			array('label'=>'List Post', 'url'=>array('index')),
			array('label'=>'Create Post', 'url'=>array('create')),
			array('label'=>'Update Post', 'url'=>array('update', 'id'=>$model->id)),
			array('label'=>'Delete Post', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
			array('label'=>'Manage Post', 'url'=>array('admin')),
	);
?>

<?php 
	$this->renderPartial('_view',array(
		'data'=>$model,
	));
?>
<hr/>

<div id="comments">

<?php if($model->commentCount>=1): ?>
	<h3><?php echo $model->commentCount . 'comment(s)'; ?></h3>
	<?php /* $this->renderPartial('_comments',array(
			'post'=>$model,
			'comments'=>$model->comments,
			));  */
	?>
<?php endif; ?>

<?php 
$this->widget('zii.widgets.CListView', array(
    'dataProvider'=>$relCommentsProvider,
    'itemView'=>'_relcomments',   // refers to the partial view named '_post'
));
?>

<?php  $this->renderPartial('/comment/_form',array(
'model'=>$comments,
));  ?>
</div>
